package com.niiwoo.civet.account.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 账户类型
 */
@Getter
@AllArgsConstructor
public enum AccountTypeEnum {

    PERSONAL((byte) 0, "普通用户（集团账户）"), ENTERPRISE((byte) 1, "机构/机构用户账户（非集团账户）");

    private final Byte value;
    private final String desc;

    public static AccountTypeEnum of(Byte value) {
        if (value != null) {
            for (AccountTypeEnum s : values()) {
                if (s.value.equals(value)) {
                    return s;
                }
            }
        }
        return null;
    }

}
